#pragma once

#include "datanode.h"
#include "../data/geometrydata.h"

namespace PBVP {
	class GeometryAttribWidget;
	class MainInterface;
	/// <summary>
	/// 
	/// </summary>
	class GeometryDataNode : public DataNode {
		Q_OBJECT
	public:
		/// <summary>
		/// 
		/// </summary>
		/// 
		/// <param name="pGeometry"></param>
		GeometryDataNode(GeometryData *pGeometry, MainInterface *mainInterface);

		/// <summary>
		/// 
		/// </summary>
		virtual ~GeometryDataNode();

		virtual bool isRenderable() {return true;}
		
		///
		virtual DataInterface* data() const {
			return m_pGeometry;
		}
		
		/// <summary>
		/// Display function
		/// </summary>
		virtual void render();
		
		/// 
		virtual QWidget* getPropertyWidget() const; 
		
		/// 
		virtual void setRenderer(RenderPlugin * pRenderer);

		/// 
		virtual void setData(DataInterface *pData);

	protected:
		GeometryData *m_pGeometry;
		GeometryAttribWidget *m_pAttribWidget;

	};
}
